﻿using System;
using System.ComponentModel;
using System.Runtime.InteropServices;

namespace Teigha.Core
{
	public class OdGiSectionGeometry : IDisposable
	{
		[EditorBrowsable(EditorBrowsableState.Never)]
		public OdGiSectionGeometry(IntPtr cPtr, bool cMemoryOwn)
		{
			this.swigCMemOwn = cMemoryOwn;
			this.swigCPtr = new HandleRef(this, cPtr);
		}

		[EditorBrowsable(EditorBrowsableState.Never)]
		public static HandleRef getCPtr(OdGiSectionGeometry obj)
		{
			if (obj != null)
			{
				return obj.swigCPtr;
			}
			return new HandleRef(null, IntPtr.Zero);
		}

		~OdGiSectionGeometry()
		{
			this.Dispose();
		}

		public virtual void Dispose()
		{
			if (this.swigCPtr.Handle != IntPtr.Zero)
			{
				if (this.swigCMemOwn)
				{
					lock (this.locker)
					{
						if (this.swigCPtr.Handle != IntPtr.Zero && this.swigCMemOwn)
						{
							this.swigCMemOwn = false;
							GlobalsPINVOKE.delete_OdGiSectionGeometry(this.swigCPtr);
						}
					}
					this.swigCMemOwn = false;
				}
				this.swigCPtr = new HandleRef(null, IntPtr.Zero);
			}
			GC.SuppressFinalize(this);
		}

		public OdGiSectionGeometry() : this(GlobalsPINVOKE.new_OdGiSectionGeometry(), true)
		{
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public SWIGTYPE_p_OdArrayT_OdSmartPtrT_OdGiDrawable_t_OdObjectsAllocatorT_OdSmartPtrT_OdGiDrawable_t_t_t intBoundaryEnts()
		{
			SWIGTYPE_p_OdArrayT_OdSmartPtrT_OdGiDrawable_t_OdObjectsAllocatorT_OdSmartPtrT_OdGiDrawable_t_t_t result = new SWIGTYPE_p_OdArrayT_OdSmartPtrT_OdGiDrawable_t_OdObjectsAllocatorT_OdSmartPtrT_OdGiDrawable_t_t_t(GlobalsPINVOKE.OdGiSectionGeometry_intBoundaryEnts__SWIG_0(this.swigCPtr), false);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public SWIGTYPE_p_OdArrayT_OdSmartPtrT_OdGiDrawable_t_OdObjectsAllocatorT_OdSmartPtrT_OdGiDrawable_t_t_t intFillEnts()
		{
			SWIGTYPE_p_OdArrayT_OdSmartPtrT_OdGiDrawable_t_OdObjectsAllocatorT_OdSmartPtrT_OdGiDrawable_t_t_t result = new SWIGTYPE_p_OdArrayT_OdSmartPtrT_OdGiDrawable_t_OdObjectsAllocatorT_OdSmartPtrT_OdGiDrawable_t_t_t(GlobalsPINVOKE.OdGiSectionGeometry_intFillEnts__SWIG_0(this.swigCPtr), false);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public SWIGTYPE_p_OdArrayT_OdSmartPtrT_OdGiDrawable_t_OdObjectsAllocatorT_OdSmartPtrT_OdGiDrawable_t_t_t backgroundEnts()
		{
			SWIGTYPE_p_OdArrayT_OdSmartPtrT_OdGiDrawable_t_OdObjectsAllocatorT_OdSmartPtrT_OdGiDrawable_t_t_t result = new SWIGTYPE_p_OdArrayT_OdSmartPtrT_OdGiDrawable_t_OdObjectsAllocatorT_OdSmartPtrT_OdGiDrawable_t_t_t(GlobalsPINVOKE.OdGiSectionGeometry_backgroundEnts__SWIG_0(this.swigCPtr), false);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public SWIGTYPE_p_OdArrayT_OdSmartPtrT_OdGiDrawable_t_OdObjectsAllocatorT_OdSmartPtrT_OdGiDrawable_t_t_t foregroundEnts()
		{
			SWIGTYPE_p_OdArrayT_OdSmartPtrT_OdGiDrawable_t_OdObjectsAllocatorT_OdSmartPtrT_OdGiDrawable_t_t_t result = new SWIGTYPE_p_OdArrayT_OdSmartPtrT_OdGiDrawable_t_OdObjectsAllocatorT_OdSmartPtrT_OdGiDrawable_t_t_t(GlobalsPINVOKE.OdGiSectionGeometry_foregroundEnts__SWIG_0(this.swigCPtr), false);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public int foregroundFaceTransparency()
		{
			int result = GlobalsPINVOKE.OdGiSectionGeometry_foregroundFaceTransparency(this.swigCPtr);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public int foregroundEdgeTransparency()
		{
			int result = GlobalsPINVOKE.OdGiSectionGeometry_foregroundEdgeTransparency(this.swigCPtr);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public void setForegroundTransparency(int faceTransp, int edgeTransp)
		{
			GlobalsPINVOKE.OdGiSectionGeometry_setForegroundTransparency(this.swigCPtr, faceTransp, edgeTransp);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		private object locker = new object();

		private HandleRef swigCPtr;

		protected bool swigCMemOwn;
	}
}
